package com.qf.gitadmin.dept.controller;

import com.qf.entity.dept.Dept;
import com.qf.gitadmin.dept.service.DeptService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * ---厚德载物---
 * Author fei
 * Date(2024/10/8)
 * Desc 希望我们都能遇到真诚的人
 * 一生要强的男人,我用双手成就你的梦想
 */
@RestController
@RequestMapping("/dept")
public class DeptController {

    @Resource
    private DeptService deptService;

    @GetMapping("/add")
        public int addDept(Dept dept){
        int insert = deptService.insert(dept);
        return insert;
    }

    @GetMapping("/delete")
    public void deleteDept(int id){
         deptService.delete(id);

    }

}
